package com.xmutca.sso.api;

import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 菜单
 * @author: 彭伟煌(pengweihuang@xmutca.com)
 * @create: 2016-08-08 14:27
 */
public class Menu implements Serializable {

    public final static Integer STATE_ENABLE = 1;
    public final static Integer STATE_UNABLE = 0;

    private Integer id;

    /**
     * 菜单名称
     */
    @NotBlank(message = "菜单名称不能为空")
    private String name;

    /**
     * 上级菜单
     */
    private Integer parent;

    /**
     * 状态
     */
    private Integer state = STATE_ENABLE;

    /**
     * 菜单拥有的权限列表
     */
    private List<Permission> permissions;

    /**
     * 创建日期
     */
    private String createDate;

    /**
     * 创建事件
     */
    private String createTime;

    /**
     * 创建时间戳
     */
    private Long createTimestamp;

    /**
     * 更新日期
     */
    private String updateDate;

    /**
     * 更新时间
     */
    private String updateTime;

    /**
     * 更新时间戳
     */
    private Long updateTimestamp;

    /**
     * 签名
     */
    private String sign;

    public List<Permission> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<Permission> permissions) {
        this.permissions = permissions;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParent() {
        return parent;
    }

    public void setParent(Integer parent) {
        this.parent = parent;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getUpdateTimestamp() {
        return updateTimestamp;
    }

    public void setUpdateTimestamp(Long updateTimestamp) {
        this.updateTimestamp = updateTimestamp;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Long getCreateTimestamp() {
        return createTimestamp;
    }

    public void setCreateTimestamp(Long createTimestamp) {
        this.createTimestamp = createTimestamp;
    }

    public String getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(String updateDate) {
        this.updateDate = updateDate;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }
}
